import cv2
import matplotlib.pyplot as plt
import numpy as np
img=cv2.imread('CV-Pictures/015.jpg',0)
plt.figure('original-hist')
plt.hist(img.ravel(),256)
img_equ=cv2.equalizeHist(img)
plt.figure('equlized_hist')
plt.hist(img_equ)
cv2.imshow('img_equ',img_equ)
plt.show()
cv2.imshow('img',img)
cv2.waitKey()
cv2.destroyAllWindows()